{% comment %}
/* Copyright 2009 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
{% endcomment %}
{% extends 'admin_base.html' %}
{% block content %}
<h3>Unreviewed Comments<h3>
<div class="table">
    <div class="row">
      <div class="cell th">Action</div>
      <div class="cell th">User Email</div>
      <div class="cell th">Nickname</div>
      <div class="cell th">Comment</div>
      <div class="cell th">Approved/Rejected</div>
    </div>

{% if unreviewed_comments %}
{% for comment in unreviewed_comments %}
    <div class="row">
      <div class="cell">
        <a
        href='/admin/comments/?comment={{comment.key}}&status=approved'>
        approve
        </a> |
        <a
        href='/admin/comments/?comment={{comment.key}}&status=rejected'>
        reject
        </a>
      </div>
      <div class="cell">
        {{comment.author.gia.email}}
      </div>
      <div class="cell">
        {{comment.author.nickname}}
      </div>
      <div class="cell">
        {{comment.body}}
      </div>
      <div class="cell">
        {{comment.approved}} / {{comment.rejected}}
      </div>
    </div>
{% endfor %}
{% endif %}
  </div>
{% endblock %}
